#include <iostream>
using namespace std;
bool symm(long n);


int main(void)
{
	long n;
	for (n = 11; n < 1000 ; n++)
	{
		if (symm(n) && symm(n*n) && symm(n*n*n))
			cout << "THE " << n << "is symm number!\n"
			<< "\n n = " << n << "\n n*n=" << n * n << "\n n*n*n=" << n * n*n << endl;
	}
}

bool symm(long n)
{
	long i, m;
	i = n;
	m = 0;
	while(i)
	{
		m = m * 10 + i % 10;
		i /= 10;
	}
	return (m==n);

}


